DLNA-based devices can be divided into: Digital Media Server/Mobile-Digital Media Server (DMS/M-DMS), Digital Media Player/Mobile-Digital Media Player (DMP/M-DMP), Digital Media Controller/Mobile-Digital Media Controller (DMC/M-DMC) and Digital Media Renderer (DMR). The digital media server is responsible for publishing multimedia content shared by users, and the type of multimedia content comprise picture, music and video, and the multimedia content can be encoded with different encoding modes and encapsulated with different file formats. The digital media player and the digital media renderer play multimedia content shared by the digital media server, and due to the capacity constraints of device, the file formats and encoding modes supported by the digital media player and the digital media server, as well as the file formats and digital media encoding modes supported by the digital media renderer and the digital media server, are different, resulting in that the digital media player and the digital media renderer cannot play all the multimedia content shared by the digital media server, in which case the digital media server needs to real-time transcode the multimedia content.
Real-time transcoding the multimedia content often requires the digital media server using the real-time streaming protocol (RTSP), when the digital media server uses the Hypertext Transfer Protocol (HTTP) to transfer data, the following questions will be encountered:
1, under normal circumstances, the digital media server which uses the HTTP to transfer data must explicitly know the data size of the multimedia content to be transferred, which requires the digital media server must pre-convert the multimedia content into a file with a specified format when achieving the multimedia transcoding function, and then it performs the HTTP transfer, which inevitably have a relatively large delay, thereby resulting in that the digital media server is unable to real-time transfer the data of multimedia content, such as digital television data, camera video data and so on, which greatly reduces the experiences of DLNA user on digital media service;
2, in the case that the data size of multimedia content to be transferred cannot be explicitly learned, the digital media server can use the Chunked Transfer Encoding (CTC) mechanism in the HTTP to real-time transfer the data of multimedia content, that is, the digital media server performs chunked transfer encoding on the data of multimedia content to transfer the data of multimedia content in the form of data blocks, and when there is no data to be sent, data blocks carrying the information that the length of data block is zero are sent, representing that the data is transferred completely, and the first byte of each data block indicates the size of data block and the byte does not comprise a Carriage Return/Line Feed (CRLF), and each data block takes the CRLF as the ending flag of a data block; when the abovementioned scheme is used to transfer the Extensible Markup Language (XML) data, the problem that the data cannot be real-time transferred because the size of data to be transferred is unknown during the HTTP transfer can be effectively solved, but when the abovementioned scheme is used to transfer data of multimedia content, it has the following problems:
1) when the CRLF is taken as the ending of each data block, since the data of multimedia content itself contains the CRLF, the CRLF can be mistaken as the ending flag of the data block transfer, thereby leading to the loss of data after the CRLF in the data block;
2) the block extension information is not fully utilized to provide relevant information of the data block.
In summary, due to the presence of the abovementioned limitations when the digital media server transfers the data of multimedia content via the HTTP, the digital media server can only real-time transcode and transfer the data of multimedia content via the RTSP or the HTTP live streaming (HLS) protocol rather than the HTTP.